{{define "Title"}}文章{{end}}
{{define "ContentWidth"}}10{{end}}
{{define "Breadcrumb"}}
	<ul class="breadcrumb">
		<li><a href="/"><i class="glyphicon glyphicon-home"></i> 首页</a></li>
		<li class="active">文章</li>
		{{if .type}}
		<li class="active">{{.type}}</li>
		{{end}}
	</ul>
{{end}}
{{define "Content"}}
	<div class="content">
		<h3><small>收录关于Golang的中文文章.如果作者发现不可以引用,请联系站长删除.</small></h3>
	</div>
	<div class="content">
		<dl class="topics">
		{{range .articles}}
		    {{$creater := .Creater $.db}}
		    {{$category := .Category $.db}}
			<dd>
				<a href="/a/{{.Id_.Hex}}/redirect" class="title" target="_blank">{{.Title}}</a>
				{{if $.username}}
					{{if .CanEdit $.username $.db}}
						<a href="/a/{{.Id_.Hex}}/edit"><i class="icon-pencil"></i></a>
						<a href="/a/{{.Id_.Hex}}/delete"><i class="icon-remove"></i></a>
					{{end}}
				{{end}}
				<div class="space"></div>
				<div class="info">
					<a class="label label-info" href="/article/go/{{$category.Id_.Hex}}">{{$category.Name}}</a> •

					<a href="/member/{{$creater.Username}}"><strong>{{$creater.Username}}</strong></a> •
                    <a href="/a/{{.Id_.Hex}}">{{if .CommentCount}} {{.CommentCount}} {{end}}评论</a> •
					{{formattime .CreatedAt}} 提交 • 来自 <a href="{{.OriginalUrl}}" target="_blank">{{.OriginalSource}}</a>
				</div>
			</dd>
		{{end}}
		</dl>
		<hr>
		{{.pagination.Html .page}}
	</div>
{{end}}

{{define "LeftSide"}}{{end}}

{{define "RightSide"}}
	<div class="col-md-2">
		<a href="/article/new" class="btn btn-info btn-lg btn-block" style="margin-bottom: 20px;">转载文章</a>
    </div>
{{end}}
